package monitor.model.parameter;


public class EcuParameter {
	private EcuParameterType type;
	private float valueAvg;
	private float valueMax;
	
	public EcuParameter() {
	}
	
	public EcuParameter(EcuParameterType type, float valueAvg, float valueMax) {
		super();
		this.type = type;
		this.valueAvg = valueAvg;
		this.valueMax = valueMax;
	}
	
	public EcuParameterType getType() {
		return type;
	}
	
	public void setType(EcuParameterType type) {
		this.type = type;
	}

	public float getValueAvg() {
		return valueAvg;
	}

	public void setValueAvg(float valueAvg) {
		this.valueAvg = valueAvg;
	}

	public float getValueMax() {
		return valueMax;
	}

	public void setValueMax(float valueMax) {
		this.valueMax = valueMax;
	}
	
	@Override
	public String toString() {
		StringBuilder json = new StringBuilder();
		json.append("{");
		json.append("\"type\":\"SPEED\",");
		json.append("\"valueAvg\":" + this.valueAvg + ",");
		json.append("\"valueMax\":" + this.valueMax);
		json.append("}");
		return json.toString();
	}
}
